<?php defined('SYSPATH') or die('No direct script access.');

class Controller_Search extends Controller_Common {

	public $template='layout/index';

	public function action_index() {
		$this->buildCarcas();
		$this->template->rightContent = View::factory('pages/search', array(
			'results' => ORM::factory('search')->where('title', 'like', '%'.$_GET['query'].'%')->or_where('text', 'like', '%'.$_GET['query'].'%')->find_all()
		));
	}

}